<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/entities/DepartmentType.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/model/DAO/mysql/filters/Filter.php';

class DepartmentTypeFilter implements Filter {
	private $type;

	public function __construct(DepartmentType $type) {
		$this->type = $type;
	}

	public function apply($entity) {
		return $entity->getType()->getIdentity() === $this->type->getIdentity();
	}
}
?>